import { lazy } from 'react'
import Basic from '../layouts/basic'
import AdminBasic from '../layouts/adminLayout'

const Login = lazy(() => import('../views/login'))
const Home = lazy(() => import('../views/home'))
const Ums = lazy(() => import('../views/ums'))

// const Home = lazy(() => import('../pages/home'))
// const Cart = lazy(() => import('../pages/cart'))
// const Mine = lazy(() => import('../pages/mine'))
// const Hook = lazy(() => import('../pages/hook'))
// const BsDemo = lazy(() => import('../pages/demo-bs'))
// const News = lazy(() => import('../pages/news'))

// const LoadImg = lazy(() => import('../pages/loadimg'))
// const Detail = lazy(() => import('../pages/detail'))

export const routes = [
  {
    path: '/admin',
    element: <AdminBasic />,
    children: [
      {
        // path: 'home',
        index: true,
        element: <Home />,
      },
      {
        path: 'ums',
        element: <Ums />,
      },
    ],
  },
  {
    path: '/',
    element: <Login />,
  },
  // {
  //   path: '/detail/:detailId',
  //   element: <Detail />,
  // },
  // {
  //   path: '/',
  //   element: <Basic />,
  //   children: [
  //     {
  //       index: true,
  //       element: <Home />,
  //     },
  //     {
  //       path: 'img',
  //       element: <LoadImg />,
  //     },
  //     {
  //       path: 'news',
  //       element: <News />,
  //     },
  //     {
  //       path: 'demo',
  //       element: <BsDemo />,
  //     },
  //     {
  //       path: 'cart',
  //       element: <Cart />,
  //     },
  //     {
  //       path: 'mine',
  //       element: <Mine />,
  //     },
  //     {
  //       path: 'hook',
  //       element: <Hook />,
  //     },
  //   ],
  // },
]
